<?php

namespace DP\Filter;

use DP\Filter\CriteriaInterface;

class CriteriaMale implements CriteriaInterface
{
    public function meetCriteria($persons)
    {
        $males = [];

        foreach ($persons as $person) {
            if ($person->gender() == 'men') {
                $males[] = $person;
            }
        }

        return $males;
    }
}
